<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改信息</title>
<JS href="../Public/js/jquery.js" />
<JS href="../Public/js/My97DatePicker/WdatePicker.js" />
<style>
.classid{width:200px; height:70px; overflow:auto; padding-left:0;}
.classid li{list-style:none; }
</style>
<script>
function chk()
{
	msg = '';
	iswrong = false;
	cidchk=false;
	$('.classid input[type=checkbox]').each(function(){
		if($(this).attr("checked")){cidchk = true;}
	})
	
	if(!cidchk){msg+="请选择栏目\\n";iswrong=true;}
	if($('#linkname').val()==''){msg+="网站名称不能为空\\n";iswrong=true;}
	if($('#linkurl').val() == ''){msg+"网站地址不能为空\\n";iswrong=true;}
	if($('#money').val() == ''){msg+="金额不能为空\\n"; iswrong = true;}
	if($('#contact').val() == ''){msg+="联系方式不能为空\\n"; iswrong = true;}
	if($('#expiration').val() == ''){msg+='到期时间不能为空'; iswrong = true;}

	if(iswrong){
		alert(msg);
		return false;
	}
}
$().ready(function(){
	sitem = '{$data.classid}'.split(',');
	for(i in sitem){
		$('#sel_id'+sitem[i]).attr('checked',true);
	}
	
	
})


</script>
</head>
<body>

<div class="body">
<form action="__ACTION__" method="post" onsubmit="return chk()">
<input type="hidden" name="modifymsg" />
<input type="hidden" name="id" value="{$data.id}" />
<table>
<tr><td>栏目:</td><td><ul class ="classid"><volist name="class" id="vo"><li><input type="checkbox" value="{$vo.id}" id="sel_id{$vo.id}" name="classid[]" />{$vo.classname}</volist></ul></td></tr>
<tr><td>网站名称：</td><td><textarea id="linkname" name="linkname">{$data.linkname}</textarea>多个网站名称请以<font color="red">,</font>号分隔 </td></tr>
<tr><td>网址：</td><td><textarea id="linkurl" name="linkurl" >{$data.linkurl}</textarea>多个网址请以<font color="red">,</font>号分隔</td></tr>
<tr><td>金额:</td><td><input type="text" id="money" name="money" value="{$data.money}"/></td></tr>
<tr><td>联系方式：</td><td><input type="text" id="contact" name="contact" value="{$data.contact}"/></td></tr>
<tr><td>到期时间:</td><td><input type="text" name="expiration" id="expiration" onClick="WdatePicker()" class="Wdate" value="{$data.expiration|date='Y-m-d',###}"/></td></tr>
<tr><td>客服信息：</td><td><textarea name="servermsg" >{$data.servermsg}</textarea></td></tr>
<tr><td>备注:</td><td><textarea name="notice" >{$data.notice}</textarea></td></tr>
<tr><td>是否有效:</td><td>无效:<input type="radio" name="vlid" <eq name="data.vlid" value="1" > checked="checked"</eq> value="1" /> 有效:<input type="radio" name="vlid" <eq name="data.vlid" value="0" > checked="checked" </eq> />
<tr><td colspan="2" align="center"><input type="submit" value="确定" /><input type="reset" value="重置" /></td></tr>
</table>
</form>

</div>


</body>
</html>
